package day_2022_9_to_12.Day;

/**
 * @author haomin
 * @date 2022/09/06 12:56
 **/
public class Day4_4_Offer58_Ⅱ_ReverseLeftWords {
    class Solution {
        public String reverseLeftWords(String s, int n) {
            StringBuffer sb = new StringBuffer();
            sb.append(new StringBuffer(s.substring(0, n)).reverse()).append(new StringBuffer(s.substring(n, s.length())));
            return sb.reverse().toString();
        }
    }
}